package com.ruoyi.qualityControl.service.impl;

import com.github.pagehelper.PageHelper;
import com.ruoyi.logistic.domain.PageDate;
import com.ruoyi.qualityControl.domain.ScOutBoundSendSheet;
import com.ruoyi.statisticalCenter.domain.ScOutboundSendClientSet;
import com.ruoyi.statisticalCenter.mapper.ScOutBoundSendSheetMapper;
import com.ruoyi.qualityControl.service.ScOutBoundSendSheetService;
import com.ruoyi.statisticalCenter.mapper.ScOutboundSendClientSetMapper;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.math.BigDecimal;
import java.util.List;

@Service
public class ScOutBoundSendSheetServiceImpl implements ScOutBoundSendSheetService
{
    @Autowired
    private ScOutBoundSendSheetMapper scOutBoundSendSheetMapper;
    @Autowired
    private ScOutboundSendClientSetMapper scOutboundSendClientSetMapper;
    @Override
    public List<ScOutBoundSendSheet> selectAll(PageDate pageDate) {
        PageHelper.startPage(pageDate);
        return scOutBoundSendSheetMapper.selectAll();
    }

    @Override
    public boolean update(ScOutBoundSendSheet scOutBoundSendSheet) {
        return scOutBoundSendSheetMapper.updateByContractAreaId(scOutBoundSendSheet);
    }

    @Override
    public ScOutBoundSendSheet selectSendDisposition(String contractAreaId) {
        return scOutBoundSendSheetMapper.selectByContractAreaId(contractAreaId);
    }

    @Override
    public List<ScOutboundSendClientSet> selectList() {
        return scOutboundSendClientSetMapper.selectAll();
    }

    @Override
    public List<ScOutboundSendClientSet> selectChildList() {
        return scOutboundSendClientSetMapper.selectChildAll();
    }

    @Override
    public boolean updateClientSet(ScOutboundSendClientSet scOutboundSendClientSet) {
        return scOutboundSendClientSetMapper.update(scOutboundSendClientSet);
    }

    @Override
    public ScOutboundSendClientSet selectByName(Integer id) {
        return scOutboundSendClientSetMapper.selectByName(id);
    }
}
